<?php
$this->headTitle($this->translate('Add page link'));
$this->headLink()
	->appendStylesheet($this->STATIC_SERVER . '/css/ui/jquery-ui-1.8.11.custom.css');
$this->headScript()
	->appendFile($this->STATIC_SERVER . '/js/jquery.ui/jquery-ui.js');
?>
<?php $this->headStyle()->captureStart(); ?>
.t_seo_slider { position: relative; height: 20px; margin-bottom: 10px; }
.t_seo_slider span { position: absolute; top: 0px; }
<?php $this->headStyle()->captureEnd(); ?>
<div class="grid_12"><?php echo $this->flashMessenger(); ?></div>
<form method="post" action="<?php echo $this->url(array(), 'seo_sitemap_add'); ?>">
	<div class="clearfix">
			<label><?php echo $this->translate('Sitemap url'); ?>:</label>
			<input type="text" name="url" id="url" style="width: 400px"<?php if ($this->url) : ?> value="<?php echo $this->url; ?>"<?php endif; ?> />
	</div>
	<hr />
	<div class="clearfix">
		<div class="grid_2 alpha"><label><?php echo $this->translate('Frequency'); ?>:</label></div>
		<div class="grid_8 omega">
			<div class="t_seo_slider">
				<span style="left: 20px"><?php echo $this->translate('always'); ?></span>
				<span style="left: 120px"><?php echo $this->translate('hourly'); ?></span>                      
				<span style="left: 220px"><?php echo $this->translate('daily'); ?></span>                       
				<span style="left: 320px"><?php echo $this->translate('monthly'); ?></span>                      
				<span style="left: 420px"><?php echo $this->translate('yearly'); ?></span>                 
				<span style="left: 520px"><?php echo $this->translate('never'); ?></span>
			</div>
			
			<div id="frequencySlider" class="clearfix" style="margin-left: 20px; width: 520px"></div>
			<input type="hidden" name="frequency" id="frequency" value="0" />
		</div>
	</div>
	<hr />
		
		<div class="clearfix">
			<div class="grid_2 alpha"><label><?php echo $this->translate('Priority'); ?>:</label></div>
			<div class="grid_8 omega">
				<div class="t_seo_slider">
                	<span style="left: 20px">0</span>
                	<span style="left: 70px">0.1</span>                      
                	<span style="left: 120px">0.2</span>                       
                	<span style="left: 170px">0.3</span>                      
                	<span style="left: 220px">0.4</span>                 
                	<span style="left: 270px">0.5</span>
                	<span style="left: 320px">0.6</span>
                	<span style="left: 370px">0.7</span>
                	<span style="left: 420px">0.8</span>
                	<span style="left: 470px">0.9</span>
                	<span style="left: 520px">1.0</span>
				</div>
				
				<div id="prioritySlider" style="margin-left: 20px; width: 520px"></div>	
				<input type="hidden" name="priority" id="priority" value="0.5" />
			</div>
		</div>
		<hr />
		
		<div class="clearfix">
			<label>&nbsp;</label>
			<button type="submit"><span><?php echo $this->translate('Submit'); ?></span></button>
		</div>
</form>
<script type="text/javascript">
$(document).ready(function() {
	var fequencies = ['always', 'hourly', 'daily', 'monthy', 'yearly', 'never'];
	$('#frequencySlider').slider({
		range: 'max',
		min: 0,
		max: 5,
		value: 1,
		slide: function(event, ui) {
			$('#frequency').val(fequencies[ui.value]);
		}
	});
	$('#frequency').val(fequencies[$('#frequencySlider').slider('value')]);
	
	var priorities = ['0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'];
	$('#prioritySlider').slider({
		range: 'max',
		min: 0,
		max: 10,
		value: 5,
		slide: function(event, ui) {
			$('#priority').val(priorities[ui.value]);
		}
	});
	$('#priority').val(priorities[$('#prioritySlider').slider('value')]);
	
	$("button").button();
});
</script>